package net.midnighttd.game.view;

import net.midnighttd.engine.Engine;

import javax.swing.*;
import java.awt.*;

/**
 * Author: Adam Scarr
 * Date: 21/04/2009
 * Time: 5:30:03 PM
 */
public class Sidepanel extends JPanel {
    private TowerSelector towerSelector;

    public Sidepanel(MainUI ui) {
        setLayout(new BorderLayout());
        setBackground(new Color(73, 86, 63));
        setMaximumSize(new Dimension(225, 0));
        setMinimumSize(new Dimension(225, 0));
        setPreferredSize(new Dimension(225, 0));
        EntityInspector td = new EntityInspector();
        towerSelector = new TowerSelector(ui, td);
        add(towerSelector, BorderLayout.NORTH);
        add(td, BorderLayout.CENTER);
    }

    public TowerSelector getTowerSelector() {
        return towerSelector;
    }

    public void reinit() {
        towerSelector.reinit();
        revalidate();
    }
}
